/*
 * @Author: Chen yi
 * @Date: 2018-11-07 16:06:21
 * @Last Modified by: Chen yi
 * @Last Modified time: 2018-11-29 09:35:53
 */

import React from 'react'
import { Actions,
  Lightbox,
  Stack, Overlay,
  Scene, Modal,
  ActionConst
} from 'react-native-router-flux'
import { StackViewStyleInterpolator } from 'react-navigation-stack'
import LaunchView from './LaunchPage'
import LoginView from './LoginPage'

const transitionConfig = () => ({
  screenInterpolator: StackViewStyleInterpolator.forFade
})

export const scenes = Actions.create(
  <Overlay key='overlay'>
    <Modal key='modal' hideNavBar transitionConfig={transitionConfig}>
      <Lightbox key='lightbox'>
        <Stack key='root' >
          <Scene key='LAUNCH_VIEW' hideNavBar panHandlers={null}
            component={LaunchView} initial type={ActionConst.RESET} />
        </Stack>
      </Lightbox>

      <Stack key='login' navTransparent backButtonTintColor='#006688' back>
        <Scene key='_login' component={LoginView} />
      </Stack>

    </Modal>
  </Overlay>
)
